#include "JassType.h"
#include "JassTypeVisitor.h"
#include "JassValue.h"
#include "PrimitiveJassType.h"
#include "IntegerJassValue.h"
#include "StringJassType.h"
#include "CodeJassType.h"
#include "RealJassType.h"
#include "RealJassValue.h"
#include "BooleanJassValue.h"
//#include "JassReturnNothingStatement.h"
//#include "DummyJassValue.h"

namespace Ast
{
    namespace Visitor
    {
        std::shared_ptr<PrimitiveJassType> JassType::INTEGER()
        {
            static PrimitiveJassType STATIC_INTEGER = PrimitiveJassType("integer", IntegerJassValue::ZERO());
            return std::shared_ptr<PrimitiveJassType>(&STATIC_INTEGER);
        }

        std::shared_ptr<PrimitiveJassType> JassType::STRING()
        {
            static StringJassType STATIC_STRING = StringJassType("string");
            return std::shared_ptr<PrimitiveJassType>(&STATIC_STRING);
        }

        std::shared_ptr<PrimitiveJassType> JassType::CODE()
        {
            static CodeJassType STATIC_CODE = CodeJassType("code");
            return std::shared_ptr<PrimitiveJassType>(&STATIC_CODE);
        }

        std::shared_ptr<PrimitiveJassType> JassType::REAL()
        {
            static RealJassType STATIC_REAL = RealJassType("real", RealJassValue::ZERO());
            return std::shared_ptr<PrimitiveJassType>(&STATIC_REAL);
        }

        std::shared_ptr<PrimitiveJassType> JassType::BOOLEAN()
        {
            static PrimitiveJassType STATIC_BOOLEAN = PrimitiveJassType("boolean", BooleanJassValue::FALSE());
            return std::shared_ptr<PrimitiveJassType>(&STATIC_BOOLEAN);
        }

        std::shared_ptr<PrimitiveJassType> JassType::NOTHING()
        {
            static PrimitiveJassType STATIC_NOTHING = PrimitiveJassType("nothing", JassReturnNothingStatement::RETURN_NOTHING_NOTICE());
            return std::shared_ptr<PrimitiveJassType>(&STATIC_NOTHING);
        }

        std::shared_ptr<PrimitiveJassType> JassType::DUMMY()
        {
            static PrimitiveJassType STATIC_DUMMY = PrimitiveJassType("dummy", DummyJassValue::PAUSE_FOR_SLEEP());
            return std::shared_ptr<PrimitiveJassType>(&STATIC_DUMMY);
        }

        StringJassType::StringJassType(const std::string name):
            PrimitiveJassType(name, StringJassValue::NULL_STRING())
        {
        }

        

        
    }
}

